#include <QtGui>
#include "Config.h"
#include "EventBus.h"
#include "Emboard.h"
#include "Viboard.h"
#include "FakeJtag.h"

using namespace etb;

int main(int argc, char **argv)
{
  QApplication app(argc, argv);

  EventBus *bus = new EventBus();
  Emboard *eb = new Emboard(bus);
  Viboard *vb = new Viboard(bus, NULL);
  FakeJtag *fj = new FakeJtag();
  fj->setEmboard(eb);

  eb->init();
  vb->init();
  bus->start();

  vb->setWindowTitle("ETB Simulator");
  vb->setJtag(fj);

  vb->show();

  app.exec();

  bus->stop();

  delete bus;
  delete eb;
  delete fj;

  return 0;
}
